package day20170923.lab01.test11; /**
 * Created by Administrator on 2017/10/4.
 */
import java.util.Scanner;

public class Test11 {
    public static void main(String[] args) {
        int a,b,c,d,e;
        Scanner sc=new Scanner(System.in);
        System.out.println("请分别输入一个数的千位 百位 十位 个位数字");
        System.out.println("千位");
        b=sc.nextInt();
        System.out.println("百位");
        c=sc.nextInt();
        System.out.println("十位");
        d=sc.nextInt();
        System.out.println("个位");
        e=sc.nextInt();
        a=b*1000+c*100+d*10+e;
        System.out.println(a);
        if((int)(a/1000)!=0)//百分号是整除符号，这里取整数，所以用"/",不用“%”
            System.out.println("此数是四位数");
        else
        if((int)(a/100)!=0)
            System.out.println("此数是三位数");
        else
        if((int)(a/10)!=0)
            System.out.println("此数是两位数");
        else
        if(a!=0)
            System.out.println("此数是一位数");
        if(a==b+c*10+d*100+e*1000)
            System.out.println("此数是回文");
        else
            System.out.println("不是回文");
    }
}
